'\" t
.TH cm2_cpproject 1 "19 September 2006" "Code Manager II"

.SH NAME
cm2 copy project \- Duplicate a specified project

.SH SYNOPSIS
.TS
l l.
cm2 copy project	\fB--destname\fP \fInewproj\fP \fB--destcode\fP \fIdir\fP [\fB--source srcproj\fP]
	[\fB--flatten\fP] [\fB--verbose\fP] [\fB--group\fP \fIGID\fP] [\fB--perms\fP \fI0NNN\fp]
	[\fB--tgtrepos\fP \fI1|2\fP] [\fB--aliases\fP \fI A[,...]\fP]
.TE

.SH DESCRIPTION
The \fPcm2 copy project(1)\fP utility is used to duplicate an existing project. By
default the new project is an \fBEXACT\fP copy of the original - including every 
revision of every file, and every release as well.

The ability to duplicate an existing project is a useful tool for allowing multiple
strands of development. Using this tool a 'branch' of an existing project can be created
and then using change sets the updates in the branch can be merged back into the
original project.

For larger projects the utility can take some time to operate. It's behaviour can
be modified through the use of command line arguments.

.SH ARGUMENTS
.TP 8
.B --destname
The name of the new project to create. Must be suitable to be represented as a UNIX
filename and must be unique.
.TP
.B --destcode
The directory to create under which the working source code for the new project
should be created.
.TP
.B --source
If the current directory does not determine the project to duplicate this argument
can be used to indicate the project to copy.
.TP
.B --flatten
Do not copy the complete revision history for all source files. Instead copy the existing
contents of the working sources and generate an existing version control repository
based on those versions. This implies all tags are lost [since the version information
they relate to will be lost].
.TP
.B --group
All files copied across should be made to belong to this group after copying.
.TP
.B --perms
Override the existing permissions and set the specified octal permissions on
all copied files.
.TP
.B --dirperms
Override the existing permissions and set the specified octal permissions on
any generated directories.
.TP
.B --tgtrepos
By default the project will be an exact duplicate - down to the back-end repository
used. This option can be used along with a value of '1' to generate an RCS-based
back-end or '2' to generate a new PV2 back-end.

Please note that this is only possible if the \fB--flatten\fP option is also
specified.
.TP
.B --aliases
Since an alias for a project must be unique as part of the duplication process the
aliases of the original project are discarded. Suitable aliases can be added at any
point later or if required this argument can be used to specify a new list of aliases
to the new project straight away.
.TP
.B --verbose
Show more information regarding the project duplication process. Especially useful
for large projects when since it can take some time to run.

.SH EXIT CODES
The \fIcm2 copy project(1)\fP follows UNIX standard practise:

.TP 4
.B 0
The copy process completed successfully.
.TP
.B >0
An error occurred during the copy process; it is likely to be incomplete.

.SH AUTHOR
The \fBCode Manager II\fP tool set was written by Simon Edwards, Proprius Consulting Ltd, (\fBwww.proprius.co.uk\fP).

.SH SEE ALSO
.BR cm2_cmpprojects(1),
.BR cm2_listreleases(1),
.BR cm2_rollback(1),
.BR cm2_tagrelease(1).
.BR cm2_tagremove(1).

.SH AVAILABILITY
This utility was specifically written under the GNU GPL license and as required
by such software comes with \fIno warranty or guarantee of any kind\fP.

